#include "file.h"

File::File(char* nomFic) {	
	name = nomFic;	
	if (stat(name,&buf) == -1) 
	{ name = "fichier invalide"; }
}

char* File::getNom() {
	return name;
}

long File::getSize() {
	long taille;
	taille=(long)buf.st_size;
	return taille; 
}

time_t File::getCreatDate() {
	// date de dernier chgmt (droits ...)	
	return buf.st_ctime;
}

time_t File::getModifDate() {
	// date de dernière modification
	return buf.st_mtime;	
}

int File::getDateCat() {
	return 0;
}


